<?php
if (empty ($data_pdf)) {
    echo "Tidak ada data";
}
else {
?>
<style>
	h4 {
		font-size:20px;
		font-weight:bold;
		margin:0px;
		margin-bottom:5px;
	}
	page{
		border:1px solid black;
	}
	p{
		margin:5px;
	}
	.header{
		width:95%;
		border-bottom:2px double black;
		padding:10px 0;
	}
	.header img{
		width:100px;
		height:auto;
	}
</style>
<page backtop="40mm" backbottom="10mm" backleft="1mm" backright="3mm">
    <page_header>
        <table class="header" cellspacing=0 cellpadding=0>
            <tr>
                <td style="text-align: left;   width: 10%"><img src='<?=base_url()?>asset/images/logo.png' /></td>
				<td style="text-align: center; width: 80%">
					<h4><?php echo $namaUniv;?></h4>
					<p><i><?php echo $alamatUniv;?></i></p>
					<p><i><?php echo $kotaUniv;?></i></p>
				</td>
                <td style="text-align: right;   width: 10%"><?php //echo date('d/m/Y'); ?></td>
            </tr>
        </table>
    </page_header>
    <page_footer>
        <table style="width: 100%; border: solid 1px black;">
            <tr>
                <td style="text-align: left;    width: 50%">Universitas Ottow Geisler Papua </td>
                <td style="text-align: right;    width: 50%">page [[page_cu]]/[[page_nb]]</td>
            </tr>
        </table>
    </page_footer>
	
	<!--<table style="width:100%;">-->
	<p align="center">Kartu Rencana Studi Semester Mahasiswa</p>
	<p align="center"></p>
	<table>
		<tr>
			<td  align="left">Fakultas</td>
			<td  align="left"> : <?php echo $data_pdf[0]->nama_fakultas;?></td>
		</tr>    
		<tr>
			<td align="left">Program Studi</td>
			<td align="left"> : <?php echo $data_pdf[0]->nama_prodi;?></td>
		</tr>
		<tr>
			<td align="left">Nim</td>
			<td align="left"> : <?php echo $data_pdf[0]->nim;?></td>
		</tr>
		<tr>
			<td align="left">Nama</td>
			<td align="left"> : <?php echo $data_pdf[0]->nama;?></td>
		</tr>
		<tr>
			<td align="left">Dosen Wali</td>
			<td align="left"> : <?php echo $data_pdf[0]->nama_dosen;?></td>
		</tr>
	</table> 
	<br/>
	<table width= "100%" border="0.2">
	  <tr>
		<td width="30">No</td>
		<td width="155">Kode Matakuliah</td>
		<td width="380">Nama Matakuliah</td>
		<td width="65">SKS</td>
	  </tr>
	  <?php 
		$no = 1;
		$sks=0;
		foreach ($data_pdf as $data){
		$sks += $data->sks;
	  ?>
	  <tr>
		<td><?php echo $no; ?></td>
		<td><?php echo $data->kd_matakuliah;?></td>
		<td><?php echo $data->nama_matakuliah;?></td>
		<td><?php echo $data->sks;?></td>
	  </tr>
	  <?php 
		$no++;
		//foreach
	  } ?>
	  <tr>
		<td colspan="3">Total SKS</td>
		<td><?php echo $sks;?></td>
	  </tr>
	</table>
<br/>
</page>

<?php } ?>